package br.com.velp.sudecap.serviceimpl;

import br.com.velp.sudecap.comum.SpringConstants;
import br.com.velp.sudecap.dao.OrgaoDAO;
import br.com.velp.sudecap.entidade.Orgao;
import br.com.velp.sudecap.service.OrgaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author Eduardo
 */
@Service("orgaoService")
@Transactional(readOnly = true)
@Lazy(SpringConstants.LAZY_BEANS)
public class OrgaoServiceImpl implements OrgaoService {
    
    @Autowired
    private OrgaoDAO orgaoDAO;

    @Override
    @Transactional(readOnly = false)
    public Long salvar(Orgao value) throws Exception {
        return this.orgaoDAO.salvar(value);
    }

    @Override
    @Transactional(readOnly = false)
    public void atualizar(Orgao value) throws Exception {
        this.orgaoDAO.atualizar(value);
    }

    @Override
    public Orgao obterPorId(Long id) {
        return this.orgaoDAO.obterPorId(id);
    }

    @Override
    @Transactional(readOnly = false)
    public void excluir(Orgao value) throws Exception {
        this.orgaoDAO.excluir(value);
    }
    
}
